import request from '@/utils/request'

export const authApi = {
  // 登录
  login(data) {
    return request.post('/auth/login', data)
  },
  
  // 登出
  logout() {
    return request.post('/auth/logout')
  },
  
  // 获取用户信息
  getUserInfo() {
    return request.get('/auth/profile')
  },
  
  // 刷新token
  refreshToken() {
    return request.post('/auth/refresh')
  },
  
  // 修改密码
  changePassword(data) {
    return request.put('/auth/password', data)
  }
}
